<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>修改密码</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<link rel="stylesheet" href="css/font.css">
	<link rel="stylesheet" href="css/top.css">
	<link rel="stylesheet" href="css/altepas.css">
</head>
<body>
<div id="wrap">
	<div class="top" id="top">
        <span class="posi-re">中国联通
            <i class="posi-ab">4G</i>
            <i class="icon iconfont icon-xinhao"></i>
        </span>
        <time class="top-time">00:00</time>
        <span>100%<i class="icon iconfont">&#xe697;</i></span>
    </div>
    <div class="sign-link">
        <a href="SignIn.html" class="link-item">退出</a>
        <a href="#" class="retrieve">找回密码</a>
        <a href="#" class="link-item"></a>
    </div>
	<form action="" method="post" class="form-block">
		<div class="ipt-txt">
			<input type="text" class="ipt" placeholder="原始密码">
			<a href="#">忘记密码</a>
		</div>
		<input type="password" class="ipt" placeholder="新密码">
		<input type="password" class="ipt" placeholder="确认密码">
		<a href="javascript:;" class="btn">确定</a>
	</form>
</div>

<script src="js/script.js"></script>
<script>
	var btn = document.querySelector(".btn");
	var ipt = document.querySelectorAll(".ipt")
	btn.onclick=function (){
		if(ipt[0].value != "666666"){
			alert("初始密码不正确")
		}else if(ipt[1].value.length > 16 || ipt[1].value.length < 5){
			alert("密码不能小于5位或超出16位")
		}else if(ipt[1].value != ipt[2].value){
			alert("两次密码不一致")
		}else if(btn){
			alert("账号已成功找回")
			btn.href="SignIn.html"
		}
	}
</script>
</body>
</html>